<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">

  <title>winsub</title>
<script>
window.onload = function(){
	var doc = window.opener;
	
	var sendMsg = doc.document.getElementById("ssmm");
	alert(sendMsg);
	var receivMsg = doc.document.getElementById("rm");
	var r = document.getElementById("rmsg");
	
	r.value = sendMsg.value;
	
	var btn = document.getElementById("btnSend");
	
	btn.onclick = function(){
		receivMsg.value = r.value;
	}
}
</script>
</head>

<body>
  수신된 메세지 : <input type="text" id="rmsg"><br/>
  <input type="button" value="전송" id="btnSend">
</body>
</html>
